From 288938445c03abd6bf99ada13a0e0dddbeba8b16 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Tue, 20 Jun 2006 15:56:48 -0600 Subject: [PATCH] [IA64] Create vpsr_pp in privregs instead of using tmp[8]. Signed-off-by: Tristan Gingold --- xen/arch/ia64/xen/vcpu.c | 17 +++++++---------- xen/include/public/arch-ia64.h | 5 +++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/xen/arch/ia64/xen/vcpu.c b/xen/arch/ia64/xen/vcpu.c index 0963b48853..86fd0e9ce2 100644 --- a/xen/arch/ia64/xen/vcpu.c +++ b/xen/arch/ia64/xen/vcpu.c @@ -271,8 +271,7 @@ IA64FAULT vcpu_reset_psr_sm(VCPU *vcpu, UINT64 imm24) if (imm.pp) { ipsr->pp = 1; psr.pp = 1; // priv perf ctrs always enabled -// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) - PSCB(vcpu,tmp[8]) = 0; // but fool the domain if it gets psr + PSCB(vcpu,vpsr_pp) = 0; // but fool the domain if it gets psr } if (imm.up) { ipsr->up = 0; psr.up = 0; } if (imm.sp) { ipsr->sp = 0; psr.sp = 0; } @@ -315,9 +314,9 @@ IA64FAULT vcpu_set_psr_sm(VCPU *vcpu, UINT64 imm24) if (imm.dfh) ipsr->dfh = 1; if (imm.dfl) ipsr->dfl = 1; if (imm.pp) { - ipsr->pp = 1; psr.pp = 1; -// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) - PSCB(vcpu,tmp[8]) = 1; + ipsr->pp = 1; + psr.pp = 1; + PSCB(vcpu,vpsr_pp) = 1; } if (imm.sp) { ipsr->sp = 1; psr.sp = 1; } if (imm.i) { @@ -362,12 +361,11 @@ IA64FAULT vcpu_set_psr_l(VCPU *vcpu, UINT64 val) if (newpsr.dfl) ipsr->dfl = 1; if (newpsr.pp) { ipsr->pp = 1; psr.pp = 1; -// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) - PSCB(vcpu,tmp[8]) = 1; + PSCB(vcpu,vpsr_pp) = 1; } else { ipsr->pp = 1; psr.pp = 1; - PSCB(vcpu,tmp[8]) = 0; + PSCB(vcpu,vpsr_pp) = 0; } if (newpsr.up) { ipsr->up = 1; psr.up = 1; } if (newpsr.sp) { ipsr->sp = 1; psr.sp = 1; } @@ -406,8 +404,7 @@ IA64FAULT vcpu_get_psr(VCPU *vcpu, UINT64 *pval) else newpsr.ic = 0; if (PSCB(vcpu,metaphysical_mode)) newpsr.dt = 0; else newpsr.dt = 1; -// FIXME: need new field in mapped_regs_t for virtual psr.pp (psr.be too?) - if (PSCB(vcpu,tmp[8])) newpsr.pp = 1; + if (PSCB(vcpu,vpsr_pp)) newpsr.pp = 1; else newpsr.pp = 0; *pval = *(unsigned long *)&newpsr; return IA64_NO_FAULT; diff --git a/xen/include/public/arch-ia64.h b/xen/include/public/arch-ia64.h index 398e6cf004..6eadb0c893 100644 --- a/xen/include/public/arch-ia64.h +++ b/xen/include/public/arch-ia64.h @@ -286,14 +286,15 @@ struct mapped_regs { unsigned long interrupt_mask_addr; int pending_interruption; int incomplete_regframe; // see SDM vol2 6.8 - unsigned long reserved5_1[4]; + unsigned char vpsr_pp; + unsigned char reserved5_2[7]; + unsigned long reserved5_1[3]; int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual int banknum; // 0 or 1, which virtual register bank is active unsigned long rrs[8]; // region registers unsigned long krs[8]; // kernel registers unsigned long pkrs[8]; // protection key registers unsigned long tmp[8]; // temp registers (e.g. for hyperprivops) - // FIXME: tmp[8] temp'ly being used for virtual psr.pp }; }; unsigned long reserved6[3456]; -- 2.30.2